
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>

// Includes ====================================================================
#include <Hello.h>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <convertors.h>

// Using =======================================================================
using namespace boost::python;

// Module ======================================================================
BOOST_PYTHON_MODULE(hello)
{
    scope* Hello_scope = new scope(
    class_< Hello >("Hello", init<  >())
        .def(init< const Hello& >())
        .def(init< std::string >())
        .def_readwrite("mMessage", &Hello::mMessage)
        .def_readwrite("mName", &Hello::mName)
        .def_readwrite("nums", &Hello::nums)
        .def_readwrite("floats", &Hello::floats)
        .def("getMessage", &Hello::getMessage)
        .def("setMessage", &Hello::setMessage)
        .def("getName", &Hello::getName)
        .def("setName", &Hello::setName)
        .def("printWelcome", &Hello::printWelcome)
        .def("getNums", &Hello::getNums)
        .def("setNums", &Hello::setNums)
        .def("printNums", &Hello::printNums)
        .def("getFloats", &Hello::getFloats)
        .def("setFloats", &Hello::setFloats)
        .def("printFloats", &Hello::printFloats)
    );
    register_ptr_to_python< boost::shared_ptr< Hello > >();
    delete Hello_scope;

    scope* TestMeShared_scope = new scope(
    class_< TestMeShared >("TestMeShared", init<  >())
        .def(init< const TestMeShared& >())
    );
    register_ptr_to_python< boost::shared_ptr< TestMeShared > >();
    delete TestMeShared_scope;

    scope* TestMeAuto_scope = new scope(
    class_< TestMeAuto >("TestMeAuto", init<  >())
        .def(init< const TestMeAuto& >())
    );
    register_ptr_to_python< std::auto_ptr< TestMeAuto > >();
    delete TestMeAuto_scope;


// Mapping from C++ std::vector<int> to tuple
/*
boost_python_convertors::std_vector_to_tuple<int>();
boost_python_convertors::from_python_sequence<
             std::vector<int>,
             boost_python_convertors::variable_capacity_policy>();
             */
// Do mapping in both ways
//boost_python_convertors::std_vector_tuple_mapping<int>();

/*
class_<std::vector<float> >("float_vector")
   .def(vector_indexing_suite<std::vector<float> >())
;

class_<std::vector<int> >("int_vector")
   .def(vector_indexing_suite<std::vector<int> >())
;
*/


}

